/**
 * $Id: TestMain.java,v 1.0 2022/6/5 22:38 shidesheng Exp $
 * <p>
 * Copyright 2021 Sinosoft Co.,Ltd. All rights reserved.
 */
package sds.mode.prototype.general;

/**
 * @author shidesheng
 * @version $Id: TestMain.java,v 1.1 2022/6/5 22:38 shidesheng Exp $
 * Created on 2022/6/5 22:38
 *
 * 原型模式 --> 克隆
 *
 */
public class TestMain {

	public static void main(String[] args) {
		// 原型对象
		ConcretePrototype concretePrototype = new ConcretePrototype();
		concretePrototype.setAge(18);
		concretePrototype.setName("xiaoming");
		System.out.println(concretePrototype);
		// 克隆对象 --> 自己编写的克隆
		ConcretePrototype clone = concretePrototype.clone();
		System.out.println(clone);

	}
}
